﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace TB_WS.ASMX
{
    /// <summary>
    /// DingTalk 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class DingTalk : System.Web.Services.WebService
    {

        [WebMethod(Description = "获取部门列表")]
        public string GET_DEPARMENT_LIST(string Seller_Nick)
        {
            string Deparment_JSON = Class.DingTalk.Get_Deparment_List(Seller_Nick);
            return Deparment_JSON;
        }

        [WebMethod(Description ="获取钉钉开放平台详细信息")]
        public DataSet GET_DingTalk_Info(string Seller_Nick)
        {
            return Class.DingTalk.get_DingTalk_Open_Info(Seller_Nick);
        }

        [WebMethod(Description ="更新钉钉开放平台配置信息")]
        public int Update_DingTalk_Info(string Seller_Nick,string App_Key,string App_Secret,string App_ID)
        {
            return Class.DingTalk.Update_DingTalk_Info(Seller_Nick, App_Key, App_Secret, App_ID);
        }

       [WebMethod(Description ="获取机器人类型列表")]
       public DataSet GET_ROBOT_TYPE_LIST()
        {
            return Class.DingTalk.Get_Robot_Type();
        }

        [WebMethod(Description ="获取机器人URL列表")]
        public DataSet GET_ROBOT_URL(int Seller_ID)
        {
            return Class.DingTalk.Get_Robot_URL(Seller_ID);
        }

        [WebMethod(Description ="添加机器人")]
        public int INSERT_ROBOT_URL(int Robot_Type,string Robot_URL,int Seller_ID)
        {
            return Class.DingTalk.Insert_Robot_URL(Robot_URL, Seller_ID, Robot_Type);
        }

    }
}
